﻿using System;

namespace CSW.Framework.Common.Binding.Events
{
    /// <summary>
    /// TypedPropertyChangedEventArgs. See <see cref="TypedPropertyChangedEventHandler&lt;T&gt;"/>.
    /// </summary>
    /// <typeparam name="T">The value type.</typeparam>
    public class TypedPropertyChangedEventArgs<T> : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TypedPropertyChangedEventArgs&lt;T&gt;"/> class.
        /// </summary>
        /// <param name="oldValue">The old value.</param>
        /// <param name="newValue">The new value.</param>
        public TypedPropertyChangedEventArgs(T oldValue, T newValue)
        {
            OldValue = oldValue;
            NewValue = newValue;
        }

        /// <summary>
        /// Gets the old value.
        /// </summary>
        /// <value>The old value.</value>
        public T OldValue { get; private set; }

        /// <summary>
        /// Gets the new value.
        /// </summary>
        /// <value>The new value.</value>
        public T NewValue { get; private set; }
    }
}
